FROM node:10

RUN npm install -g webpack

RUN mkdir -p /home/admin

WORKDIR /home/admin

COPY . /home/admin

RUN npm install --loglevel verbose

RUN npm run build

WORKDIR /home/admin/server

RUN npm install --loglevel verbose

EXPOSE 3001

ENTRYPOINT ["node", "index.js"]